package com.lqd.mall.system.service;

import com.lqd.mall.interaction.system.SysDictDataEntity;
import com.lqd.mall.jpa.service.BaseService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Optional;

/**
 * @author 零起点
 * @create 2022-03-20 22:00
 */

public interface ISysDictDataService extends BaseService<SysDictDataEntity,Long> {
    List<SysDictDataEntity> findSysDictData(String dictType);

    @Transactional
    Optional<Integer> upateDictData(String oldValue, String newValue);

    /**
     * 添加数据
     * @param entity
     * @return
     */
    @Transactional
    Optional<Integer> save(SysDictDataEntity entity);

    @Transactional
    Optional<Integer> deleteSysDictData(Long dictCode);
}
